Field of the Invention
The present invention relates to an image processing apparatus, an image processing apparatus control method, an image pickup apparatus, and an image pickup apparatus control method.
Description of the Related Art
There has been known a type of image pickup apparatus that uses a pupil division-type phase difference detecting method or a plurality of images different from one another in blurring to detect a defocus amount (the difference between a light receiving plane and an image forming plane of a lens).
A method of calculating the defocus amount from the image deviation amount (parallax amount) of an image is disclosed in Japanese Patent Application Laid-Open No. 2008-15754. An image is divided into minute blocks, a correlation value is calculated by deviating data relative to a pair of pieces of pixel data in one of the minute blocks, and a deviation amount at which the correlation is highest is obtained as the parallax amount. From the calculated deviation amount and a conversion efficient, which is determined based on an image pickup element's pixel pitch and a lens that are used, the defocus amount is calculated with respect to an expected image forming plane of an object image plane.
A method of calculating the defocus amount by Depth from Defocus (DFD) is disclosed in Japanese Patent Application Laid-Open No. 2013-253964. In DFD, a photographing parameter of an image pickup optical system is controlled so as to obtain a plurality of images different from one another in blurring, and the amount of correlation in blurring between a measurement target pixel and its surrounding pixels in the plurality of obtained images is calculated to calculate the defocus amount. The defocus amount calculated by these methods is a distance on the image plane, and object distance information can therefore be calculated further by converting the image plane distance into an object plane distance with the use of the lens equation.
Technologies of applying the defocus amount and the object distance that are calculated by these methods to various types of image processing have been disclosed as well. In Japanese Patent Application Laid-Open No. 2010-45457, face brightness correction includes performing processing in which a correction gain is changed in relation to the defocus amount so that the face in focus has an appropriate brightness. Japanese Patent Application Laid-Open No. 2013-243529 includes performing processing in which an image pickup apparatus uses the object distance to pick up an image of an object when the object is within a prescribed distance from the image pickup apparatus.